﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JibberJabber.PartDesigners;

namespace JibberJabber.LivePreviews
{
    internal class QuestionPreview : PreviewTemplate
    {
        QuestionDesigner qed;

        internal QuestionPreview(QuestionDesigner qd)
        {
            qed = qd;
            checkOk(qd);
        }

        protected override void configureTempConversation(TempConversation tc)
        {
            SpeakerDesigner speaker = Program.FindSpeakerByName(qed.cmbSpeaker.Text);
            if (speaker != null)
                tc.SetSpeaker(speaker);
            tc.SetContent(qed);
        }
    }
}
